﻿
Imports xmlctrl
Imports xhtmlctrl
Imports webctrl

Public Class idcard
    Inherits cacheControlProcessor

    Public Const _pathidentity As String = "/idcard"
    Public Const mapId As String = "id_map"
    Private config As configParser = Nothing

    Public Overrides Sub initial(Optional ByVal config As configParser = Nothing)
        MyBase.initial(config)
        Me.config = config
    End Sub

    Protected Overrides Function normalretiredticks() As Int64
        Return npos
    End Function

    Public Overrides Function pathidentity() As String
        Return _pathidentity
    End Function

    Protected Overloads Overrides Function processImpl(ByVal context As httpContext _
                                                       , ByRef control As xmlcontrol) As Boolean
        Dim page As xhtmlpage = Nothing
        page = context.createControl(New xhtmlpage())
        page.title().text = "urlshorten online IDCard - " + applicationSign()

        Dim img As img = Nothing
        img = context.createControl(New img())
        img.src = staticrequest.generateStaticfileLinkUrl("idcard.png")
        img.usemap = "#" + mapId
        img.style = "border: 0;"
        page.body().addchild(img)

        Dim map As map = Nothing
        map = context.createControl(New map())
        map.id = mapId
        page.body().addchild(map)

        Dim area As area = Nothing
        area = context.createControl(New area())
        area.href = strmid(ie8accInstaller._pathidentity, strlen(network.pathSeperator))
        area.title = "IE 8 Accelerator download"
        area.alt = area.title
        area.shape = xhtmlControl_1_1.shape_enum.rect
        area.coords = "31,66,121,116"
        map.addchild(area)

        area = context.createControl(New area())
        area.href = strmid(usclient._pathidentity, strlen(network.pathSeperator))
        area.title = "urlshorten client download"
        area.alt = area.href
        area.shape = xhtmlControl_1_1.shape_enum.rect
        area.coords = "146,66,210,116"
        map.addchild(area)

        area = context.createControl(New area())
        area.href = network.thislevelPathMark
        area.title = "urlshorten homepage"
        area.alt = area.title
        area.shape = xhtmlControl_1_1.shape_enum.rect
        area.coords = "0,0,260,120"
        map.addchild(area)

        control = page
        Return True
    End Function
End Class
